package com.mdd.maduoduo.domain.interactor;

import com.mdd.maduoduo.domain.executor.PostExecutionThread;
import com.mdd.maduoduo.domain.executor.ThreadExecutor;
import com.mdd.maduoduo.domain.repository.LoginRepository;
import com.mdd.maduoduo.entity.LoginEntity;
import com.mdd.maduoduo.entity.Response;

import javax.inject.Inject;

import io.reactivex.Observable;

public class LoginData extends UseCase<Response<LoginEntity>,String>{

    @Inject
    LoginRepository mRepository;

    @Inject
    LoginData(ThreadExecutor threadExecutor, PostExecutionThread postExecutionThread) {
        super(threadExecutor, postExecutionThread);
    }

    @Override
    Observable<Response<LoginEntity>> buildUseCaseObservable(String url) {
        return mRepository.login(url);
    }
}
